﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using Newtonsoft.Json;

namespace AUV5.DAL.Handler
{
    public class FeedBackHandler
    {
        public IList<Model.FeedBack> feedbacklist = new List<Model.FeedBack>();
        public void GetFullList(object sender, object parameterObj, IList list)
        {
            Model.FeedBack request = GetFullRequest(sender);
            if (request != null)
            {
                feedbacklist.Add(request);
            }
        }
        private Model.FeedBack GetFullRequest(object sender)
        {
            try
            {
                if (sender != null)
                {

                    //获取用户信息
                    Model.FeedBack feedback = (Model.FeedBack)sender;
                    Model.UserInfo user = new Model.UserInfo();
                    user.UserID = feedback.UserId;
                    Model.UserInfo adder = Dao.UserInfoSqlMapDao.Instance.GetDetail(user);
                    feedback.User = adder;
                    return feedback;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception e)
            {
                throw new Exception("Error executing FeedBackHandler,  Cause: " + e.Message, e);
            }

        }

    }
}
